package com.zhangmeng.tools.builder;

import com.zhangmeng.tools.music.musicPlayer.MusicPlayer;
import javafx.fxml.JavaFXBuilderFactory;
import javafx.util.Builder;
import javafx.util.BuilderFactory;

/**
 * @author : 芊芊墨客
 * @version : 1.0
 * @date : 2023-04-24 11:21
 */
public class MusicPlayerBuilderFactory implements  BuilderFactory {

    private final JavaFXBuilderFactory jff = new JavaFXBuilderFactory();

    @Override
    public Builder<?> getBuilder(Class<?> type) {
        if (type == MusicPlayer.class){
            return new MusicPlayerBuilder();
        }else {
            return jff.getBuilder(type);
        }
    }
}
